import React from 'react'
import { Menu,Layout } from 'antd'
import RouterBeforeEach from '../../../routers/RouterBeforeEach.js'
import { useNavigate } from 'react-router-dom'
const {Sider,Content}=Layout;
export default function PersonalSet() {
  let to = useNavigate()
  let handleMenuClick=(e)=>{
    to(`/home/personal_set${e.key}`)
  }
  return (
    <div className='aside-menu-bar'>
    <Layout style={{height:'75vh'}}>
      <Sider style={{backgroundColor:'#FFF'}}>
        <Menu
        onClick={handleMenuClick}
        defaultSelectedKeys={['/']}
        mode='inline'
        style={{height:'90%',margin:'15px 0'}}
      >
        <Menu.Item
          key="/"
        >
          基本设置
        </Menu.Item>
        <Menu.Item
          key="/safe_set"
        >
          安全设置
        </Menu.Item>
        </Menu>
      </Sider>
      <Layout style={{backgroundColor:'#FFF',overflow: 'hidden',overflowY:'scroll'}}>
        <Content style={{height:'90%',padding:'25px'}}><RouterBeforeEach/></Content>
      </Layout>
    </Layout>
    </div>
  )
}
